﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace MiniBottles.Models
{
    public abstract class Base : IBase
    {
        public Base()
        {
            this.CreateDate = DateTime.Now;
            this.UpdateDate = DateTime.Now;
            this.IsActive = true;
            this.IsDeleted = false;
        }
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        
        [Display(Name = "Data utworzenia")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime CreateDate { get; set; }

       
        [Display(Name = "Data aktualizacji")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime UpdateDate { get; set; }

        [Display(Name = "Aktywna")]
        public bool IsActive { get; set; }

        [Display(Name = "Usunięta")]
        public bool IsDeleted { get; set; }
    }
    public interface IBase
    {

    }
}